# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='device',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
                ('device_hostname', models.CharField(verbose_name='主机名称', max_length=255)),
                ('device_type', models.CharField(verbose_name='主机类型', choices=[('阿里云', '阿里云'), ('腾讯云', '腾讯云'), ('本地虚拟机', '本地虚拟机'), ('贵阳机房', '贵阳机房')], max_length=50)),
                ('device_address', models.CharField(verbose_name='主机地址', max_length=255)),
                ('device_port', models.CharField(verbose_name='SSH端口', max_length=50)),
                ('device_contact', models.CharField(verbose_name='登记人员', max_length=50, blank=True)),
                ('device_system', models.CharField(default='Centos6.8', max_length=50, verbose_name='系统版本')),
                ('device_remarks', models.CharField(verbose_name='备注', max_length=255, blank=True)),
                ('device_signtime', models.DateField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
                ('responsibility', models.CharField(max_length=100, blank=True)),
                ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Process',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
                ('procss_content', models.TextField(blank=True)),
                ('process_signtime', models.DateField(auto_now_add=True)),
                ('process_signer', models.CharField(default='system', max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='service',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
                ('service_name', models.CharField(verbose_name='服务名称', max_length=255)),
                ('service_port', models.CharField(verbose_name='端口号', max_length=50)),
                ('service_project', models.CharField(verbose_name='所属项目', choices=[('花无缺', '花无缺'), ('友邻', '友邻'), ('停车场', '停车场'), ('其他', '其他')], max_length=50)),
                ('service_type', models.CharField(verbose_name='服务类型', choices=[('数据库', '数据库'), ('JAVA', 'JAVA'), ('PHP', 'PHP'), ('NGINX', 'NGINX'), ('缓存服务', '缓存服务'), ('图片服务器', '图片服务器'), ('其他', '其他')], max_length=50)),
                ('service_status', models.CharField(verbose_name='服务状态', choices=[('启动', '启动'), ('未启动', '未启动')], max_length=50)),
                ('service_contact', models.CharField(verbose_name='登记人员', max_length=50, blank=True)),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='hwuque.device')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
                ('task_code', models.CharField(default='error_code', max_length=30)),
                ('task_title', models.CharField(verbose_name='任务名称', max_length=100)),
                ('task_category', models.CharField(default='日常维护', choices=[('业务部署', '业务部署'), ('业务下线', '业务下线'), ('日常维护', '日常维护')], max_length=100, verbose_name='任务分类')),
                ('task_contacts', models.TextField(verbose_name='联系人', blank=True)),
                ('task_status', models.CharField(default='处理中', max_length=20, verbose_name='处理中')),
                ('task_signer', models.CharField(default='system', max_length=30)),
                ('task_signtime', models.DateField(auto_now_add=True)),
                ('task_member', models.ManyToManyField(to='hwuque.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Upload',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)),
                ('upload_title', models.CharField(max_length=255)),
                ('upload_path', models.CharField(max_length=255)),
                ('upload_signtime', models.DateTimeField(auto_now_add=True, null=True)),
                ('task', models.ForeignKey(to='hwuque.Task')),
            ],
        ),
        migrations.AddField(
            model_name='process',
            name='task',
            field=models.ForeignKey(to='hwuque.Task'),
        ),
    ]
